<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>编写函数 is_string(arg) 判断传入的内容是否为字符串</title>
</head>

<body>
  <script>
    let str = 123
    function is_String(str) {
      return (typeof str == 'string')
    }
    console.log(is_String(str))
  </script>
</body>

</html>